package com.tarena.lbs.attach.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tarena.lbs.attach.pojo.dto.AttachQrDTO;
import com.tarena.lbs.attach.pojo.entity.Attach;
import com.tarena.lbs.attach.pojo.param.AttachQRParam;
import com.tarena.lbs.attach.pojo.param.PicUpdateParam;
import com.tarena.lbs.attach.pojo.po.AttachPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.List;

@Mapper
public interface AttachMapper extends BaseMapper<Attach> {

    @Insert("INSERT INTO attach(file_uuid) " +
            "VALUES(#{fileUuid})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insertAttachInfo(Attach attach);


    int batchUpdateAttachByIdOrFileUUID(List<PicUpdateParam> params);

    AttachQrDTO generateQrCode(AttachQRParam attachQRParam);
}